""" System imports """
import logging
import pygame

""" Equinox """

""" Constants """


""" Set up logging """
_log = logging.getLogger("equinox.sprites")


SPRITE_WIDTH = 32
SPRITE_HEIGHT = 32
SPRITE_SIZE = (SPRITE_WIDTH,SPRITE_HEIGHT)
CHARACTER_WIDTH = 24
CHARACTER_HEIGHT = 24
CHARACTER_SIZE = (CHARACTER_WIDTH,CHARACTER_HEIGHT)

class SectorSprite(pygame.sprite.Sprite):
    def __init__(self, sector, group=None):
        pygame.sprite.Sprite.__init__(self, group)
        self.image = pygame.Surface( SPRITE_SIZE )
        self.image.fill( (0,255,128) )
        pygame.draw.rect(self.image, (0,0,0), self.image.get_rect(), 1)

        self.sector = sector

#------------------------------------------------------------------------------
class CharacterSprite(pygame.sprite.Sprite):
    def __init__(self, group=None):
        pygame.sprite.Sprite.__init__(self, group)

        characterSurf = pygame.Surface( CHARACTER_SIZE )
        characterSurf = characterSurf.convert_alpha()
        characterSurf.fill((0,0,0,0)) #make transparent
        pygame.draw.circle( characterSurf, (255,0,0), (16,16) , 8)
        self.image = characterSurf
        self.rect  = characterSurf.get_rect()

        self.moveTo = None

    #----------------------------------------------------------------------
    def update(self):
        if self.moveTo:
            self.rect.center = self.moveTo
            self.moveTo = None